package com.bw.mapper;

import com.bw.bean.Vo;
import com.bw.bean.Vo1;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface VoMapper {
    @Select("select sum(amount) from payment where status='支付成功'")
    int getList2();

    @Select("select p.orderinfoid 'name',sum(amount) 'value'  from orderinfo o\n" +
            "left join payment p on o.id = p.orderinfoid\n" +
            "group by p.orderinfoid")
    List<Vo1> getList3();
}
